/*
 * Created by SharpDevelop.
 * User: kktn
 * Date: 11.07.2006
 * Time: 12:42
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

namespace TagTool.Devices
{
    public enum GeneralConstants : uint
    {
        MaximumNameLength = 32,
        MaximumOEMNameLength = 260
    }

	/// <summary> Definition of basis of for multimedia flags </summary>
	public enum ResourceBase : uint
    {
        SystemError = 0,
        MidiError = 64,
        JoystickError = 160
    }

    /// <summary> Definition of error flags for multimedia functions </summary>
    public enum GeneralErrorFlag : uint
    {
        /* general error return values */
        NoError = 0,                    /* no error */
        Error = ResourceBase.SystemError + 1,  /* unspecified error */
        BadDeviceId = ResourceBase.SystemError + 2,  /* device ID out of range */
        NotEnabled = ResourceBase.SystemError + 3,  /* driver failed enable */
        Allocated = ResourceBase.SystemError + 4,  /* device already allocated */
        InvalidHandle = ResourceBase.SystemError + 5,  /* device handle is invalid */
        NoDriver = ResourceBase.SystemError + 6,  /* no device driver present */
        NoMemory = ResourceBase.SystemError + 7,  /* memory allocation error */
        NotSupported = ResourceBase.SystemError + 8,  /* function isn't supported */
        BadErrorNumber = ResourceBase.SystemError + 9,  /* error value out of range */
        InvalidFlag = ResourceBase.SystemError + 10, /* invalid flag passed */
        InvalidParam = ResourceBase.SystemError + 11, /* invalid parameter passed */
        HandlBusy = ResourceBase.SystemError + 12, /* handle being used */
        /* simultaneously on another */
        /* thread (eg callback) */
        InvalidAlias = ResourceBase.SystemError + 13, /* specified alias not found */
        BadRegDatabase = ResourceBase.SystemError + 14, /* bad registry database */
        RegKeyNotFound = ResourceBase.SystemError + 15, /* registry key not found */
        RegReadError = ResourceBase.SystemError + 16, /* registry read error */
        RegWriteError = ResourceBase.SystemError + 17, /* registry write error */
        RegDeleteError = ResourceBase.SystemError + 18, /* registry delete error */
        RegValueNotFound = ResourceBase.SystemError + 19, /* registry value not found */
        NoDriverCallback = ResourceBase.SystemError + 20, /* driver does not call DriverCallback */
        MoreData = ResourceBase.SystemError + 21, /* more data to be returned */
        LastError = ResourceBase.SystemError + 21 /* last error in range */
    }
    
    /// <summary> Definition of callbacks </summary>
    public enum CallbackFlag : uint
    {
        TypeMask = 0x00070000,  /* callback type mask */
        Null = 0x00000000,      /* no callback */
        Window = 0x00010000,    /* dwCallback is a HWND */
        Task = 0x00020000,      /* dwCallback is a HTASK */
        Function = 0x00030000,  /* dwCallback is a FARPROC */
        Thread = Task,			/* thread ID replaces 16 bit task */
        Event = 0x00050000      /* dwCallback is an EVENT Handle */
    }

    /// <summary> Return value definition for multimedia functions </summary>
    public enum MMResult : uint
    {
        NoError = GeneralErrorFlag.NoError,
        BadDeviceId = GeneralErrorFlag.BadDeviceId, // The specified device identifier is out of range.
        InvalidParam = GeneralErrorFlag.InvalidParam, // The specified pointer or structure is invalid.
        NoDriver = GeneralErrorFlag.NoDriver, // The driver is not installed.
        NoMemory = GeneralErrorFlag.NoMemory, //The system is unable to allocate or lock memory.
        InvalidHandle = GeneralErrorFlag.InvalidHandle // The specified device handle is invalid.
    }

}
